import { Rule, RuleType } from '@midwayjs/validate';
const requiredString = RuleType.string().required();
export class DepartmentDTO {
  @Rule(
    requiredString.pattern(/^.+医院.+科室$/, '格式不正确，请输入 xx医院xx科室')
  )
  departmentName: string;
}
export class NewDirectorIdDTO {
  @Rule(requiredString.min(1).max(200))
  newDirectorId: string;
}
export class UserIdDTO {
  @Rule(requiredString.min(1).max(200))
  userId: string;
  @Rule(RuleType.string().min(1).max(200))
  departmentId: string;
}
export class DepartmentIdDTO {
  @Rule(requiredString.min(1).max(200))
  departmentId: string;
}

export class UpdateDepartmentDTO {
  @Rule(RuleType.string().min(1).max(200))
  departmentId: string;
  @Rule(
    RuleType.string().pattern(
      /^.+医院.+科室$/,
      '格式不正确，请输入 xx医院xx科室'
    )
  )
  name: string;
  @Rule(RuleType.number().min(0).max(1))
  validFlag: number;
}
